import service from '@/utils/request'

export const createOdsDbConfig = (data) => {
  return service({
    url: '/odsDbConfig/createOdsDbConfig',
    method: 'post',
    data
  })
}

export const deleteOdsDbConfig = (data) => {
  return service({
    url: '/odsDbConfig/deleteOdsDbConfig',
    method: 'delete',
    data
  })
}

export const deleteOdsDbConfigByIds = (data) => {
  return service({
    url: '/odsDbConfig/deleteOdsDbConfigByIds',
    method: 'delete',
    data
  })
}

export const updateOdsDbConfig = (data) => {
  return service({
    url: '/odsDbConfig/updateOdsDbConfig',
    method: 'put',
    data
  })
}

export const findOdsDbConfig = (params) => {
  return service({
    url: '/odsDbConfig/findOdsDbConfig',
    method: 'get',
    params
  })
}

export const getOdsDbConfigList = (params) => {
  return service({
    url: '/odsDbConfig/getOdsDbConfigList',
    method: 'get',
    params
  })
}

export const getAllOdsDbConfigs = (params) => {
  return service({
    url: '/odsDbConfig/getAllOdsDbConfigs',
    method: 'get',
    params
  })
}

export const getOdsDbConfig = (data) => {
  return service({
    url: '/odsDbConfig/getOdsDbConfig',
    method: 'post',
    data
  })
}

export const initOdsDbConfig = () => {
  return service({
    url: '/odsDbConfig/initOdsDbConfig',
    method: 'get',
  })
}

export const getOdsDbTree = () => {
  return service({
    url: '/odsDbConfig/getOdsDbTree',
    method: 'get',
  })
}

export const startOdsDbJob = (data) => {
  return service({
    url: '/odsDbConfig/startOdsDbJob',
    method: 'post',
    data
  })
}

export const stopOdsDbJob = (data) => {
  return service({
    url: '/odsDbConfig/stopOdsDbJob',
    method: 'post',
    data
  })
}
